package com.xinqi.modules.prepare.folder.dto.req;

import com.xinqi.common.green.annotation.Text;
import com.xinqi.modules.prepare.common.PrepareLimitConstant;
import com.xinqi.modules.prepare.prepare.enums.PrepareTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 备课区文件夹-请求对象-新增
 *
 * @author: system
 * @date: 2023/03/19
 */
@Data
@Schema(description = "备课区文件夹-请求对象-新增")
public class PrepareFileFolderCreateDTO implements Serializable {

    /**
     * 备课区id
     */
    @Schema(description = "备课区id", example = "", hidden = true)
    private Long prepareId;
    /**
     * 类型，1:互动课件；2:资料；3:作业；4:测评；5:讨论；6:互动视频；8:公告；99:题库；10:成员
     */
    @Schema(description = "类型，1:互动课件；2:资料；3:作业；4:测评；5:讨论；6:互动视频；8:公告；99:题库；10:成员", example = "1")
    @NotNull(message = "备课区类型不能为空")
    private PrepareTypeEnum type;
    /**
     * 父id
     */
    @Schema(description = "文件夹父id，根目录为0", example = "0")
    @NotNull(message = "文件夹父ID不能为空")
    private Long pid;
    /**
     * 文件名称
     */
    @Text
    @Schema(description = "文件夹名称", example = "文件夹")
    @NotBlank(message = "文件夹名称不能为空")
    @Size(max = PrepareLimitConstant.NAME_WORKS_LIMIT, message = "名称不能超过15个字")
    private String name;
}
